<template>
	<view class="content">
		<!-- <image class="logo" src="/static/logo.png"></image> -->
	<!-- 	<view class="text-area">
			<text class="title">{{title}}</text>
		</view> -->
		<view class="way" @click="goActivity()">跳转到原生app的activity</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
			goActivity(){
				console.log("开始记录");
				var main = plus.android.runtimeMainActivity();
				var Intent = plus.android.importClass("android.content.Intent");
				var intent = new Intent(main.getIntent());
				intent.setClassName(main, "io.dcloud.uniplugin.MainActivity");
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				// intent.putExtra("xxx", "111111");
				main.startActivity(intent);
			}
		}
	}
</script>

<style>
	.content {
		width: 100%;
		margin: 20rpx auto;
	}
	.way{
		width: 700rpx;
		height: 80rpx;
		margin: 30rpx;
		background-color: #007AFF;
		color: #FFFFFF;
		font-size: 28rpx;
		text-align: center;
		line-height: 80rpx;
		margin: 20rpx auto;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
